/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package actions;

import beans.DisplayUsersFormBean;
import dto.JfMembers;
import dto.UserWarning;
import dto.UserWarningHome;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import moderator.ModeratorControlPanel;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import moderator.ModeratorControlPanel;

/**
 *
 * @author Deena
 */
public class ModUserControl extends org.apache.struts.action.Action {

    Vector<JfMembers> jfmembers;
    ModeratorControlPanel mod = new ModeratorControlPanel();


    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        

        jfmembers =new Vector<JfMembers>();
        System.out.print("in modusercontrol");
        jfmembers = mod.getAllUsers();
        System.out.print("vectooooooooooooor size in action" + jfmembers.size());
        ((DisplayUsersFormBean) form).setJfmembers(jfmembers);
        if(jfmembers.size()!=0)
        {
            return mapping.findForward("done");
        }
        return mapping.findForward("error");
    }
}
